/*******************************************************************************
 * -------
 *   Copyright 2011 @ Fluid India Consultancy
 *   All Rights Reserved
 * -------
 ******************************************************************************/
package org.fluidindia.security.dao;

import org.fluidindia.security.domain.User;

/**
 * Interface to the <code>Data Access Object</code> that interacts with the data store
 * to the Users table. 
 * 
 * @author Kapil Viren Ahuja
 *
 */
public interface IUserDao
{
    /**
     * Loads a single user for the provided username and password. This method does the following:
     * 
     * <ol>
     * <li>If a user is found with the username and password, the initialized object of the user is returned;</li>
     * <li>If there are multiple users found, it throws an exception;</li>
     * <li>If there are no users found, this method return a blank object (avoid returning null to avoid exception in upper layers).</li>
     * </ol>
     * 
     */
    User getUser(String username, String password);
}
